console.log('加载page_qblist.js');
myApp.onPageInit('qblist', function (page) {
	//开启loader
	myApp.showIndicator();
	
	/******获取情报******/
//	var uuid = $$('#qblist').data('uuid');
//	var major = $$('#qblist').data('major');
//	var minor = $$('#qblist').data('minor');
	var uuid = page.query.uuid;
	var major = page.query.major;
	var minor = page.query.minor;

	$$.ajax({
		url:url_post_wx_deivce_qb,
	    method:"POST",
	    data: {uuid:uuid,major:major,minor:minor},
	    dataType:'json',
	    success: function (ajaxresult) {    	
	    	if(ajaxresult.code==1){
	    		var res=ajaxresult.data;
	    		//获取数据
	    		qbdata = res.qb;
	    		//console.log(qbdata);
	    		bgdata = res.bg;
	    		//console.log(bgdata);
	    		//情报和背景数据写入模板
	    		var html_qb = myApp.qblistItemTemplate(qbdata);
	    		var html_bg = myApp.qblistItemTemplate(bgdata);
			    $$('#tab_qb').html(html_qb);
			    $$('#tab_bg').html(html_bg);
			    //将列表项url加上参数
			    $$('.qbitem').each(function(){
			    	var url = $$(this).attr('href');
			    	url +="?uuid="+uuid+"&major="+major+"&minor="+minor;
			    	$$(this).attr('href',url);
			    })
			    //关闭loader
				myApp.hideIndicator();
	        }else{
	            console.log(ajaxresult.msg);
	        }
	    }
	});
});